import socket
udp_client = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
udp_client.bind(('',8006))
address = ('192.168.0.107',8080)
while True:
    mess = input('请输入你要发送的数据：')
    if mess:
        udp_client.sendto(mess.encode('utf-8'),address)
        data = udp_client.recvfrom(1024)
        print(data[0].decode('utf-8'))
    else:
        break
udp_client.close()